﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using Zombsquare;
using Zombsquare.Models;

namespace Zombsquare
{
    public partial class PointList : PhoneApplicationPage
    {
        public PointList()
        {
            InitializeComponent();
            DataContext = Application.Current;
        }

        private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e)
        {
           
        }

        private void MainListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (MainListBox.SelectedIndex > -1)
            { 
                //Navegar al mapa a la posición especificada
                App.ViewModel.NavigateTo = ((PushpinModel)e.AddedItems[0]);
                NavigationService.GoBack();
            }
        }
    }
}